package com.zwps.biz.api.enums;

import com.zwps.common.tool.enums.InterfaceEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum ProTypeEnum implements InterfaceEnum<Integer> {
    RAIN_GAUGE(1, "日常检查"),
    WATER_LEVEL_STATION(2, "年度检查"),
    SEEPAGE_PRESSURE(3, "特别检查");


    /**
     * 编码
     */
    private Integer code;

    /**
     * 名称
     */
    private String name;

    public static String getByCode(Integer code) {
        for (ProTypeEnum typeEnum : ProTypeEnum.values()) {
            if (typeEnum.getCode().equals(code)) {
                return typeEnum.name;
            }
        }
        return null;
    }

    @Override
    public String getTypeName() {
        return "查询巡查类型";
    }
}
